package com.cloud.feign.client;

import com.cloud.feign.fallback.FeignConsumerFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


/***
 * 其中name是你调用服务端的名称
 * fallback是你定义的降级处理类，作为兜底的数据
 */
@FeignClient(name = "feign-provider",fallback = FeignConsumerFallback.class)
public interface IFeignClient {

    @GetMapping("/hello")
    String hello(@RequestParam("name") String name);

}
